#!/usr/bin/env python
# _*_coding:utf-8 _*_
__author__ = "Gao"
"""画线条"""
import sys
import pygame
from pygame.locals import *

pygame.init()
screen =pygame.display.set_mode((600,500))
pygame.display.set_caption('画线')

while True:
    for event in pygame.event.get():
        if event.type in (QUIT,KEYDOWN):
            sys.exit()
    screen.fill((0,80,0))

    color = 100,255,200
    width = 1
    pos_start = 100,100    # 线的起始坐标
    pos_end = 500,400    # 线的结束坐标

    pygame.draw.line(screen,color,pos_start,pos_end,width)
    pygame.display.update()